package ModelLayer;


public class Lending
{
    private int lendingId;
    private String lendingDate;
    private String lendingPeriod;
    private Copy lendingCopy;
    private Person lendingPerson;
    
    public Lending(int id, String date, String period, Copy copy, Person person)
    {
        lendingId = id;
        lendingDate = date;
        lendingPeriod = period;
        lendingCopy = copy;
        lendingPerson = person;
    }
    
    public void setLendingId(int newLendingId) {
        lendingId = newLendingId;
    }
    
    public void setLendingDate(String newLendingDate) {
        lendingDate = newLendingDate;
    }
    
    public void setLendingPeriod(String newLendingPeriod) {
        lendingPeriod = newLendingPeriod;
    }
    
    public void setLendingCopy(Copy newLendingCopy) {
        lendingCopy = newLendingCopy;
    }
    
    public void setLendingPerson(Person newLendingPerson) {
        lendingPerson = newLendingPerson;
    }
        
    public int getLendingId() {
        return lendingId;
    }
    
    public String getLendingDate() {
        return lendingDate;
    }
    public String getLendingPeriod() {
        return lendingPeriod;
    }
    public Copy getLendingCopy() {
        return lendingCopy;
    }
    public Person getLendingPerson() {
        return lendingPerson;
    }
    
   /* public void lendCopy(Copy copy) 
    {
        if (lendingStatus == false) {
            lendingCopy = copy;
            lendingStatus = true;
            System.out.println("Lend success");
        }
        
        else {
            System.out.println("This lending already contains one copy" + lendingCopy.copySerialNumber);
        }
        
    }*/
    
}
